/* 变量定义 */
:root {
    --primary-color: #3498db;
    --primary-dark: #2980b9;
    --secondary-color: #2c3e50;
    --success-color: #2ecc71;
    --warning-color: #f1c40f;
    --danger-color: #e74c3c;
    --light-bg: #f8f9fa;
    --border-radius: 15px;
    --box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    --box-shadow-hover: 0 8px 25px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
    --nav-width: 250px;
}

/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background: var(--light-bg);
    color: #333;
}

/* 通用组件样式 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

.btn i {
    margin-right: 8px;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.card {
    background: white;
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--box-shadow-hover);
}

/* 导航栏样式 */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--nav-width);
    height: 100vh;
    background: var(--secondary-color);
    padding: 20px;
    color: white;
    z-index: 1000;
}

.main-nav ul {
    list-style: none;
    margin-top: 20px;
}

.main-nav ul li {
    margin-bottom: 10px;
}

.main-nav ul li a {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-radius: 8px;
    transition: var(--transition);
}

.main-nav ul li a:hover {
    background: rgba(255,255,255,0.1);
    transform: translateX(5px);
}

.main-nav ul li a i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

/* 内容区域样式 */
.content {
    margin-left: var(--nav-width);
    min-height: 100vh;
    background: var(--light-bg);
}

/* 页面标题样式 */
.page-header {
    background: white;
    padding: 20px 30px;
    border-bottom: 1px solid #eee;
    box-shadow: var(--box-shadow);
}

.page-header h1 {
    margin: 0;
    color: var(--secondary-color);
    font-size: clamp(1.5em, 3vw, 2em);
}

/* 首页仪表盘样式 */
.dashboard-container {
    padding: 30px;
}

.welcome-banner {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    color: white;
    padding: 40px;
    border-radius: var(--border-radius);
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--box-shadow);
}

.welcome-text h1 {
    font-size: clamp(2em, 4vw, 2.5em);
    margin-bottom: 15px;
    font-weight: 600;
    line-height: 1.2;
}

.welcome-text p {
    font-size: clamp(1em, 2vw, 1.2em);
    opacity: 0.9;
}

.welcome-date {
    text-align: right;
    background: rgba(255,255,255,0.1);
    padding: 20px;
    border-radius: var(--border-radius);
    backdrop-filter: blur(5px);
}

.welcome-date h2 {
    font-size: clamp(1.2em, 3vw, 1.8em);
    margin-bottom: 5px;
}

/* 统计卡片样式 */
.stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    display: flex;
    align-items: center;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-hover);
}

.stat-icon {
    width: clamp(50px, 8vw, 60px);
    height: clamp(50px, 8vw, 60px);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    font-size: clamp(24px, 4vw, 28px);
}

.stat-info h3 {
    font-size: clamp(24px, 4vw, 28px);
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 5px;
}

.stat-info p {
    color: #7f8c8d;
    font-size: clamp(14px, 2vw, 16px);
}

/* 主要内容区域样式 */
.main-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

/* 地图区域样式 */
.map-section {
    background: white;
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--box-shadow);
}

.map-section h2 {
    color: var(--secondary-color);
    margin-bottom: 20px;
    font-size: 1.5em;
    font-weight: 600;
}

#map-container {
    height: clamp(300px, 50vh, 500px);
    border-radius: 10px;
    overflow: hidden;
}

/* 活动列表样式 */
.activities-section {
    background: white;
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--box-shadow);
}

.activities-section h2 {
    color: var(--secondary-color);
    margin-bottom: 20px;
    font-size: 1.5em;
    font-weight: 600;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: calc(100vh - 300px);
    overflow-y: auto;
}

.activity-item {
    padding: 15px;
    border-radius: 10px;
    background: var(--light-bg);
    transition: var(--transition);
    border-left: 4px solid transparent;
}

.activity-item:hover {
    background: #eef2f7;
    border-left-color: var(--primary-color);
    transform: translateX(5px);
}

.activity-time {
    font-size: 14px;
    color: #95a5a6;
    margin-bottom: 5px;
}

/* 地图弹出窗口样式 */
.map-popup-link {
    display: inline-flex;
    align-items: center;
    margin-top: 10px;
    padding: 8px 15px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: var(--transition);
}

.map-popup-link:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* 加载动画 */
.loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 5px solid var(--light-bg);
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 9999;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* 响应式布局 */
@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .main-nav {
        transform: translateX(-100%);
        transition: var(--transition);
    }
    
    .main-nav.active {
        transform: translateX(0);
    }
    
    .content {
        margin-left: 0;
    }
    
    .dashboard-container {
        padding: 20px;
    }
    
    .welcome-banner {
        flex-direction: column;
        text-align: center;
        padding: 30px;
    }
    
    .welcome-date {
        margin-top: 20px;
        text-align: center;
    }
    
    .stat-card {
        padding: 20px;
    }
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light-bg);
}

::-webkit-scrollbar-thumb {
    background: #bdc3c7;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #95a5a6;
} 